package com.dream.dreamhouse.service;

import com.dream.dreamhouse.entity.Dream;
import com.dream.dreamhouse.entity.vo.DreamVo;
import com.github.pagehelper.PageInfo;

import java.util.List;


/**
 * @author lizhen
 * @date 2025/6/6 17:04
 */
public interface DreamService {

    /**
     * 获取梦想分页数据
     *
     * @param dreamVo
     * @return
     */
    PageInfo<Dream> getDreamPage(DreamVo dreamVo);

    /**
     * 新增梦想数据
     *
     * @param dreamVo
     */
    void addDream(DreamVo dreamVo);

    /**
     * 根据点赞排序查询
     *
     * @return
     */
    PageInfo<Dream> findByLikes(DreamVo dreamVo);

    /**
     * 点赞
     *
     * @param dreamVo
     */
    void increaseLikeCount(DreamVo dreamVo);

    /**
     * 取消点赞
     *
     * @param dreamVo
     */
    void decreaseLikeCount(DreamVo dreamVo);

    /**
     * 根据时间排序查询
     *
     * @param dreamVo
     * @return
     */
    PageInfo<Dream> findByTime(DreamVo dreamVo);
}
